//
//  HMToplistDetailModel.m
//  HowToDo
//
//  Created by Stan on 2017-01-05.
//  Copyright © 2017 KY. All rights reserved.
//

#import "HMToplistDetailModel.h"
#import "HMNetWorkTool.h"
#import <YYModel.h>
#import "HMToplist.h"

@implementation HMToplistDetailModel

+ (void)requestToplistDetailBySeriesid:(NSInteger)seriesId andFinished:(void(^)(id responseObject))completedBlock Failed:(void(^)(NSError* error))failedBlock{
    
    [[HMNetWorkTool sharedTool]requestToplistDetailBySeriesid:seriesId andFinished:^(id responseObject) {
        
        if ([responseObject isKindOfClass:[NSDictionary class]]) {
            NSArray *toplistDetailArray = [NSArray yy_modelArrayWithClass:[HMToplist class] json:responseObject[@"data"]];
            
            completedBlock(toplistDetailArray);
        }
    } Failed:^(NSError *error) {
        
        HMLog(@"error%@",error);
    }];
    
}
@end
